package com.dokimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dokimall.common.to.mq.SeckillOrderTo;
import com.dokimall.common.utils.PageUtils;
import com.dokimall.order.entity.OrderEntity;
import com.dokimall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author mori
 * @email 550144898@qq.com
 * @date 2021-09-26 17:15:23
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);
    /**
     * 订单确认页需要返回的数据
     * */
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    SumitOrderResponseVo submitOrder(OrderSubimtVo orderSubimtVo);

    OrderEntity getInfoBySn(String orderSn);

    void closeOrder(OrderEntity orderEntity);

    PayVo payOrder(String orderSn);

    PageUtils listWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void saveSeckillOrder(SeckillOrderTo seckillOrderTo);
}

